home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Games / ADoomPPC / src / doomtype.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-12-26  |  1.6 KB  |  73 lines

  1. // Emacs style mode select   -*- C++ -*- 
  2. //-----------------------------------------------------------------------------
  3. //
  4. // $Id:$
  5. //
  6. // Copyright (C) 1993-1996 by id Software, Inc.
  7. //
  8. // This source is available for distribution and/or modification
  9. // only under the terms of the DOOM Source Code License as
  10. // published by id Software. All rights reserved.
  11. //
  12. // The source is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
  15. // for more details.
  16. //
  17. // DESCRIPTION:
  18. //    Simple basic typedefs, isolated here to make it easier
  19. //     separating modules.
  20. //    
  21. //-----------------------------------------------------------------------------
  22.  
  23.  
  24. #ifndef __DOOMTYPE__
  25. #define __DOOMTYPE__
  26.  
  27.  
  28. #ifndef __BYTEBOOL__
  29. #define __BYTEBOOL__
  30. // Fixed to use builtin bool type with C++.
  31. #ifdef __cplusplus
  32. typedef bool boolean;
  33. #else
  34. typedef enum {false, true} boolean;
  35. #endif
  36. #ifndef byte
  37. typedef unsigned char byte;
  38. #endif
  39. #endif
  40.  
  41.  
  42. // Predefined with some OS.
  43. #ifdef LINUX
  44. #include <values.h>
  45. #else
  46. #define MAXCHAR        ((char)0x7f)
  47. #define MAXSHORT    ((short)0x7fff)
  48.  
  49. // Max pos 32-bit int.
  50. #ifndef MAXINT
  51. #define MAXINT        ((int)0x7fffffff)    
  52. #endif
  53. #define MAXLONG        ((long)0x7fffffff)
  54. #define MINCHAR        ((char)0x80)
  55. #define MINSHORT    ((short)0x8000)
  56.  
  57. // Max negative 32-bit integer.
  58. #ifndef MININT
  59. #define MININT        ((int)0x80000000)    
  60. #endif
  61. #define MINLONG        ((long)0x80000000)
  62. #endif
  63.  
  64.  
  65.  
  66.  
  67. #endif
  68. //-----------------------------------------------------------------------------
  69. //
  70. // $Log:$
  71. //
  72. //-----------------------------------------------------------------------------
  73.